# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.WalletObjects.V1.Model.FlightCarrier do
  @moduledoc """


  ## Attributes

  *   `airlineAllianceLogo` (*type:* `GoogleApi.WalletObjects.V1.Model.Image.t`, *default:* `nil`) - A logo for the airline alliance, displayed below the QR code that the passenger scans to board.
  *   `airlineLogo` (*type:* `GoogleApi.WalletObjects.V1.Model.Image.t`, *default:* `nil`) - A logo for the airline described by carrierIataCode and localizedAirlineName. This logo will be rendered at the top of the detailed card view.
  *   `airlineName` (*type:* `GoogleApi.WalletObjects.V1.Model.LocalizedString.t`, *default:* `nil`) - A localized name of the airline specified by carrierIataCode. If unset, `issuer_name` or `localized_issuer_name` from `FlightClass` will be used for display purposes. eg: "Swiss Air" for "LX"
  *   `carrierIataCode` (*type:* `String.t`, *default:* `nil`) - Two character IATA airline code of the marketing carrier (as opposed to operating carrier). Exactly one of this or `carrierIcaoCode` needs to be provided for `carrier` and `operatingCarrier`. eg: "LX" for Swiss Air
  *   `carrierIcaoCode` (*type:* `String.t`, *default:* `nil`) - Three character ICAO airline code of the marketing carrier (as opposed to operating carrier). Exactly one of this or `carrierIataCode` needs to be provided for `carrier` and `operatingCarrier`. eg: "EZY" for Easy Jet
  *   `kind` (*type:* `String.t`, *default:* `nil`) - Identifies what kind of resource this is. Value: the fixed string `"walletobjects#flightCarrier"`.
  *   `wideAirlineLogo` (*type:* `GoogleApi.WalletObjects.V1.Model.Image.t`, *default:* `nil`) - The wide logo of the airline. When provided, this will be used in place of the airline logo in the top left of the card view.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :airlineAllianceLogo => GoogleApi.WalletObjects.V1.Model.Image.t() | nil,
          :airlineLogo => GoogleApi.WalletObjects.V1.Model.Image.t() | nil,
          :airlineName => GoogleApi.WalletObjects.V1.Model.LocalizedString.t() | nil,
          :carrierIataCode => String.t() | nil,
          :carrierIcaoCode => String.t() | nil,
          :kind => String.t() | nil,
          :wideAirlineLogo => GoogleApi.WalletObjects.V1.Model.Image.t() | nil
        }

  field(:airlineAllianceLogo, as: GoogleApi.WalletObjects.V1.Model.Image)
  field(:airlineLogo, as: GoogleApi.WalletObjects.V1.Model.Image)
  field(:airlineName, as: GoogleApi.WalletObjects.V1.Model.LocalizedString)
  field(:carrierIataCode)
  field(:carrierIcaoCode)
  field(:kind)
  field(:wideAirlineLogo, as: GoogleApi.WalletObjects.V1.Model.Image)
end

defimpl Poison.Decoder, for: GoogleApi.WalletObjects.V1.Model.FlightCarrier do
  def decode(value, options) do
    GoogleApi.WalletObjects.V1.Model.FlightCarrier.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.WalletObjects.V1.Model.FlightCarrier do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
